{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "9ce3dae4-9dd8-48fe-9f3a-6e1ddd79e5a0",
   "metadata": {},
   "source": [
    "# [Beta] Multi-modal ReAct Agent\n",
    "\n",
    "<a href=\"https://colab.research.google.com/github/jerryjliu/llama_index/blob/main/docs/examples/multi_modal/mm_agent.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
    "\n",
    "In this tutorial we show you how to construct a multi-modal ReAct agent.\n",
    "\n",
    "This is an agent that can take in both text and images as the input task definition, and go through chain-of-thought + tool use to try to solve the task.\n",
    "\n",
    "This is implemented with our lower-level Agent API, allowing us to explicitly step through the ReAct loop to show you what's happening in each step.\n",
    "\n",
    "We show two use cases:\n",
    "1. **RAG Agent**: Given text/images, can query a RAG pipeline to lookup the answers. (given a screenshot from OpenAI Dev Day 2023)\n",
    "2. **Web Agent**: Given text/images, can query a web tool to lookup relevant information from the web (given a picture of shoes).\n",
    "\n",
    "**NOTE**: This is explicitly a beta feature, the abstractions will likely change over time! \n",
    "\n",
    "**NOTE**: This currently only works with GPT-4V."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d50c7396-e56a-4018-bb45-596c218a1947",
   "metadata": {},
   "source": [
    "## Augment Image Analysis with a RAG Pipeline\n",
    "\n",
    "In this section we create a multimodal agent equipped with a RAG Tool."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "68bcdd1c-c69f-4da6-9712-29a8ad25b858",
   "metadata": {},
   "source": [
    "### Setup Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "54ce02e1-1edc-44fd-b160-0e15cc1961f1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "--2024-01-02 20:25:25--  https://images.openai.com/blob/a2e49de2-ba5b-4869-9c2d-db3b4b5dcc19/new-models-and-developer-products-announced-at-devday.jpg?width=2000\n",
      "Resolving images.openai.com (images.openai.com)... 2606:4700:4400::6812:28cd, 2606:4700:4400::ac40:9333, 172.64.147.51, ...\n",
      "Connecting to images.openai.com (images.openai.com)|2606:4700:4400::6812:28cd|:443... connected.\n",
      "HTTP request sent, awaiting response... 200 OK\n",
      "Length: 300894 (294K) [image/jpeg]\n",
      "Saving to: ‘other_images/openai/dev_day.png’\n",
      "\n",
      "other_images/openai 100%[===================>] 293.84K  --.-KB/s    in 0.02s   \n",
      "\n",
      "2024-01-02 20:25:25 (13.8 MB/s) - ‘other_images/openai/dev_day.png’ saved [300894/300894]\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# download images we'll use to run queries later\n",
    "!wget \"https://images.openai.com/blob/a2e49de2-ba5b-4869-9c2d-db3b4b5dcc19/new-models-and-developer-products-announced-at-devday.jpg?width=2000\" -O other_images/openai/dev_day.png\n",
    "!wget \"https://drive.google.com/uc\\?id\\=1B4f5ZSIKN0zTTPPRlZ915Ceb3_uF9Zlq\\&export\\=download\" -O other_images/adidas.png"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d0522215-4d36-4bbc-8c77-945c4e1bc9a4",
   "metadata": {},
   "outputs": [],
   "source": [
    "from llama_hub.web.simple_web.base import SimpleWebPageReader\n",
    "\n",
    "url = \"https://openai.com/blog/new-models-and-developer-products-announced-at-devday\"\n",
    "reader = SimpleWebPageReader(html_to_text=True)\n",
    "documents = reader.load_data(urls=[url])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e7dfd978-7f56-4a15-9e56-019c7a35f35e",
   "metadata": {},
   "source": [
    "### Setup Tools"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "24b510d5-419e-4963-bba9-cb76efcf7ba4",
   "metadata": {},
   "outputs": [],
   "source": [
    "from llama_index.llms import OpenAI\n",
    "from llama_index import ServiceContext, VectorStoreIndex\n",
    "from llama_index.tools import QueryEngineTool, ToolMetadata"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "367e4884-bf62-45f1-9e0c-211379287bfb",
   "metadata": {},
   "outputs": [],
   "source": [
    "llm = OpenAI(temperature=0, model=\"gpt-3.5-turbo\")\n",
    "service_context = ServiceContext.from_defaults(llm=llm)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "60b78d55-5a36-4943-8a25-468e26566c56",
   "metadata": {},
   "outputs": [],
   "source": [
    "vector_index = VectorStoreIndex.from_documents(\n",
    "    documents, service_context=service_context\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fc8bb089-f84f-465f-a9df-d883df82d839",
   "metadata": {},
   "outputs": [],
   "source": [
    "query_tool = QueryEngineTool(\n",
    "    query_engine=vector_index.as_query_engine(),\n",
    "    metadata=ToolMetadata(\n",
    "        name=f\"vector_tool\",\n",
    "        description=(\n",
    "            \"Useful to lookup new features announced by OpenAI\"\n",
    "            # \"Useful to lookup any information regarding the image\"\n",
    "        ),\n",
    "    ),\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6aaa1543-5c43-43bd-8d22-fe2729a51b25",
   "metadata": {},
   "source": [
    "### Setup Agent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f698d34d-6cb6-419b-b4f8-983f85ee2914",
   "metadata": {},
   "outputs": [],
   "source": [
    "from llama_index.agent.react_multimodal.step import MultimodalReActAgentWorker\n",
    "from llama_index.agent import AgentRunner\n",
    "from llama_index.multi_modal_llms import MultiModalLLM, OpenAIMultiModal\n",
    "from llama_index.agent import Task\n",
    "\n",
    "mm_llm = OpenAIMultiModal(model=\"gpt-4-vision-preview\", max_new_tokens=1000)\n",
    "\n",
    "# Option 2: Initialize AgentRunner with OpenAIAgentWorker\n",
    "react_step_engine = MultimodalReActAgentWorker.from_tools(\n",
    "    [query_tool],\n",
    "    # [],\n",
    "    multi_modal_llm=mm_llm,\n",
    "    verbose=True,\n",
    ")\n",
    "agent = AgentRunner(react_step_engine)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "afbe933d-fa7c-4d56-8c0f-faf1746bc09d",
   "metadata": {},
   "outputs": [],
   "source": [
    "query_str = (\n",
    "    \"The photo shows some new features released by OpenAI. \"\n",
    "    \"Can you pinpoint the features in the photo and give more details using relevant tools?\"\n",
    ")\n",
    "\n",
    "from llama_index.schema import ImageDocument\n",
    "\n",
    "# image document\n",
    "image_document = ImageDocument(image_path=\"other_images/openai/dev_day.png\")\n",
    "\n",
    "task = agent.create_task(\n",
    "    query_str,\n",
    "    extra_state={\"image_docs\": [image_document]},\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "18c30caf-2f3a-4202-8fde-b1c3099db726",
   "metadata": {},
   "outputs": [],
   "source": [
    "def execute_step(agent: AgentRunner, task: Task):\n",
    "    step_output = agent.run_step(task.task_id)\n",
    "    if step_output.is_last:\n",
    "        response = agent.finalize_response(task.task_id)\n",
    "        print(f\"> Agent finished: {str(response)}\")\n",
    "        return response\n",
    "    else:\n",
    "        return None\n",
    "\n",
    "\n",
    "def execute_steps(agent: AgentRunner, task: Task):\n",
    "    response = execute_step(agent, task)\n",
    "    while response is None:\n",
    "        response = execute_step(agent, task)\n",
    "    return response"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a0900fb2-9e16-4d75-9aa4-23180decffa7",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Run this and not the below if you just want to run everything at once.\n",
    "# response = execute_steps(agent, task)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "934df138-6fb7-4adb-903d-c7e7a008b1e1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[1;3;38;5;200mThought: I need to use a tool to help me identify the new features released by OpenAI as shown in the photo.\n",
      "Action: vector_tool\n",
      "Action Input: {'input': 'new features released by OpenAI'}\n",
      "\u001b[0m\u001b[1;3;34mObservation: OpenAI has released several new features, including the GPT-4 Turbo model, the Assistants API, and multimodal capabilities. The GPT-4 Turbo model is more capable, cheaper, and supports a 128K context window. The Assistants API makes it easier for developers to build their own assistive AI apps with goals and the ability to call models and tools. The multimodal capabilities include vision, image creation (DALLÂ·E 3), and text-to-speech (TTS). These new features are being rolled out to OpenAI customers starting at 1pm PT today.\n",
      "\u001b[0m"
     ]
    }
   ],
   "source": [
    "response = execute_step(agent, task)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "85783870-d51b-46cb-8588-3de1bdf1feb9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[1;3;38;5;200mThought: The observation provided information about the new features released by OpenAI, which I can now relate to the image provided.\n",
      "Response: The photo shows a user interface with a section titled \"Playground\" and several options such as \"GPT-4.0-turbo,\" \"Code Interpreter,\" \"Translate,\" and \"Chat.\" Based on the observation from the tool, these features are part of the new releases by OpenAI. Specifically, \"GPT-4.0-turbo\" likely refers to the GPT-4 Turbo model, which is a more capable and cost-effective version of the language model with a larger context window. The \"Code Interpreter\" could be related to the Assistants API, which allows developers to build AI apps that can interpret and execute code. The \"Translate\" and \"Chat\" options might be part of the multimodal capabilities, with \"Translate\" possibly involving text-to-text language translation and \"Chat\" involving conversational AI capabilities. The multimodal capabilities also include vision and image creation, which could be represented in the Playground interface but are not visible in the provided section of the photo.\n",
      "\u001b[0m> Agent finished: The photo shows a user interface with a section titled \"Playground\" and several options such as \"GPT-4.0-turbo,\" \"Code Interpreter,\" \"Translate,\" and \"Chat.\" Based on the observation from the tool, these features are part of the new releases by OpenAI. Specifically, \"GPT-4.0-turbo\" likely refers to the GPT-4 Turbo model, which is a more capable and cost-effective version of the language model with a larger context window. The \"Code Interpreter\" could be related to the Assistants API, which allows developers to build AI apps that can interpret and execute code. The \"Translate\" and \"Chat\" options might be part of the multimodal capabilities, with \"Translate\" possibly involving text-to-text language translation and \"Chat\" involving conversational AI capabilities. The multimodal capabilities also include vision and image creation, which could be represented in the Playground interface but are not visible in the provided section of the photo.\n"
     ]
    }
   ],
   "source": [
    "response = execute_step(agent, task)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c45113bd-73aa-44f5-b803-652231fcb92a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The photo shows a user interface with a section titled \"Playground\" and several options such as \"GPT-4.0-turbo,\" \"Code Interpreter,\" \"Translate,\" and \"Chat.\" Based on the observation from the tool, these features are part of the new releases by OpenAI. Specifically, \"GPT-4.0-turbo\" likely refers to the GPT-4 Turbo model, which is a more capable and cost-effective version of the language model with a larger context window. The \"Code Interpreter\" could be related to the Assistants API, which allows developers to build AI apps that can interpret and execute code. The \"Translate\" and \"Chat\" options might be part of the multimodal capabilities, with \"Translate\" possibly involving text-to-text language translation and \"Chat\" involving conversational AI capabilities. The multimodal capabilities also include vision and image creation, which could be represented in the Playground interface but are not visible in the provided section of the photo.\n"
     ]
    }
   ],
   "source": [
    "print(str(response))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f60e6265-0b30-477f-9b09-d5268c76f040",
   "metadata": {},
   "source": [
    "## Augment Image Analysis with Web Search\n",
    "\n",
    "In this example we show you how to setup a GPT-4V powered agent to lookup information on the web to help better explain a given image."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2c3631cc-5a6c-4bb7-a972-34467e96c399",
   "metadata": {},
   "outputs": [],
   "source": [
    "from llama_hub.tools.metaphor.base import MetaphorToolSpec\n",
    "from llama_index.agent.react_multimodal.step import MultimodalReActAgentWorker\n",
    "from llama_index.agent import AgentRunner\n",
    "from llama_index.multi_modal_llms import MultiModalLLM, OpenAIMultiModal\n",
    "from llama_index.agent import Task\n",
    "\n",
    "metaphor_tool_spec = MetaphorToolSpec(\n",
    "    api_key=\"<api_key>\",\n",
    ")\n",
    "metaphor_tools = metaphor_tool_spec.to_tool_list()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "99c37097-cd5c-4819-b42e-f19cc4f268be",
   "metadata": {},
   "outputs": [],
   "source": [
    "mm_llm = OpenAIMultiModal(model=\"gpt-4-vision-preview\", max_new_tokens=1000)\n",
    "\n",
    "# Option 2: Initialize AgentRunner with OpenAIAgentWorker\n",
    "react_step_engine = MultimodalReActAgentWorker.from_tools(\n",
    "    metaphor_tools,\n",
    "    # [],\n",
    "    multi_modal_llm=mm_llm,\n",
    "    verbose=True,\n",
    ")\n",
    "agent = AgentRunner(react_step_engine)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9a692881-f70e-4815-a89a-3b584ec1b844",
   "metadata": {},
   "outputs": [],
   "source": [
    "from llama_index.schema import ImageDocument\n",
    "\n",
    "query_str = \"Look up some reviews regarding these shoes.\"\n",
    "image_document = ImageDocument(image_path=\"other_images/adidas.png\")\n",
    "\n",
    "task = agent.create_task(\n",
    "    query_str, extra_state={\"image_docs\": [image_document]}\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6621c3aa-22c2-46e9-b405-9c99d3b4d657",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[1;3;38;5;200mThought: The image shows a pair of shoes from a website that appears to be selling them. The user is asking for reviews of these shoes, but the image does not provide specific details such as the brand or model name. I will need to use a search tool to find reviews based on the visual information provided.\n",
      "Action: search\n",
      "Action Input: {'query': 'reviews for yellow and white running shoes with black stripes'}\n",
      "\u001b[0m[Metaphor Tool] Autoprompt: Here is a review for a great pair of yellow and white running shoes with black stripes:\n",
      "\u001b[1;3;34mObservation: [{'title': '| On', 'url': 'https://www.on-running.com/en-us/', 'id': 'bO8WCIY4qIAlfi5MbHMw7A'}, {'title': 'ASICS Gel Nimbus 21 Review 2023, Facts, Deals ($81)', 'url': 'https://runrepeat.com/asics-gel-nimbus-21', 'id': 'l-1YebY9dIRt1d8MeHyaBg'}, {'title': 'ASICS UK | Official Running Shoes & Clothing | ASICS', 'url': 'https://www.asics.com/gb/en-gb/', 'id': 'aAY5Tpax5jevadvNMj34_w'}, {'title': 'Asics Gel Nimbus', 'url': 'https://www.thepeacefulrunner.com/asics-gel-nimbus.html', 'id': 'l8joVUIb-c6H5BTKqu7fJw'}, {'title': 'hoka clifton', 'url': 'https://www.zappos.com/hoka-clifton?PID=3428536&AID=11554337&splash=none&cjevent=65a454d2018811ed82ca7c440a82b82a&zap_placement=', 'id': 'iPqidPvLy-wt02B9GdgG8g'}, {'title': '| On United States', 'url': 'https://www.on-running.com/en-us/shop?utm_source=facebook&utm_medium=post&utm_campaign=cloud_x_w45&utm_content=launch', 'id': 'pUaSVBqAbU-VNvj0KEkNlw'}, {'title': 'Shoe Review: Skechers GORun Speed Elite Hyper', 'url': 'https://athleticsillustrated.com/shoe-review-skechers-gorun-speed-elite-hyper/', 'id': 'B3ijN8qSaV1eBkoOCeV9yw'}, {'title': 'Saucony Running Shoes & Running Apparel | Saucony.com', 'url': 'https://www.saucony.com/en/country', 'id': 'ng-HmN8CxK2TAKmA9gPLTg'}, {'title': 'The entire Kalenji range and training plans on Kalenji.co.uk - Shoes, clothing and accessories for running and trail running.', 'url': 'https://www.kalenji.co.uk/', 'id': 'SHrJYCGb5g9yoehuu8zOzg'}, {'title': 'ONEMIX Men Running Shoes Trainers Comfortable Damping Outdoor Athletic Vulcanized Tennis Shoes Trail Sneakers', 'url': 'https://usa.banggood.com/ONEMIX-Men-Running-Shoes-Trainers-Comfortable-Damping-Outdoor-Athletic-Vulcanized-Tennis-Shoes-Trail-Sneakers-p-1745312.html?imageAb=2&p=H320105094792201606N&akmClientCountry=America&a=1675672269.4621&akmClientCountry=America', 'id': 'Dh81GLQU2gi4Efc2z8ZzYA'}]\n",
      "\u001b[0m"
     ]
    }
   ],
   "source": [
    "response = execute_step(agent, task)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2e77161b-50d6-4fb9-934e-336a0eaf1e30",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[1;3;38;5;200mThought: The search results returned a variety of shoe brands and models, but none of them seem to match the specific shoes in the image. To find reviews for the exact shoes, I need more information about the brand or model. Since the image shows a website interface with the brand likely being \"UltraBOOST 1.0 DNA\" and a discount code \"CYBER,\" I can use this information to refine my search for reviews.\n",
      "Action: search\n",
      "Action Input: {'query': 'UltraBOOST 1.0 DNA shoes reviews'}\n",
      "\u001b[0m[Metaphor Tool] Autoprompt: Here is a review of the UltraBOOST 1.0 DNA shoes:\n",
      "\u001b[1;3;34mObservation: [{'title': 'Shoe', 'url': 'https://therunningclinic.com/shoe/?id=81645', 'id': 'SR5Ar004nuT97AkWDTdekg'}, {'title': 'Shoe', 'url': 'https://therunningclinic.com/shoe/?id=81644', 'id': 'kiEvTAolb2Kh4OrvSxnqUA'}, {'title': 'On Cloudboom Review', 'url': 'https://www.doctorsofrunning.com/2020/12/on-cloudboom-review.html', 'id': 'J3ARnLPH1KWzrIdGogwxnw'}, {'title': 'Adidas UltraBOOST 5.0 DNA Glow now available', 'url': 'https://dlmag.com/adidas-ultraboost-5-0-dna-glow-now-available', 'id': 'wljZXtnx28OF5YtEXcbwXg'}, {'title': 'Ultraboost 19 Review in 2020 (comparison)', 'url': 'https://www.youtube.com/watch?v=n9_23gq7ER0&amp;t=6s', 'id': 'B3QWxLBJgA9FR6HRmOnW2A'}, {'title': 'Adidas ULTRABOOST LIGHT : Detailed First Impressions', 'url': 'https://www.youtube.com/watch?v=780bVc3yjsk', 'id': 'LOUPO-1rU2tZJd31YFYYXA'}, {'title': 'Adidas Ultraboost Review : 7 pros, 2 cons (2023)', 'url': 'https://runrepeat.com/adidas-ultra-boost', 'id': 'Xqa5dR7IR24En7uL5BCTEg'}, {'title': 'VLOG # 999 | The MOST *Challenging* Running SHOE of 2018', 'url': 'https://www.youtube.com/watch?v=3KWIWLtyrSw', 'id': 'avKLkDhnPT3eTwAvI6Wi7g'}, {'title': 'NEW ARRIVALS', 'url': 'http://www.adidasultraboost.us.org/', 'id': 'NhKaTjMI_rIIS0tWLrJXAA'}, {'title': 'Brooks Hyperion Tempo Review (2020: Better Late Than Never)', 'url': 'https://www.doctorsofrunning.com/2023/01/brooks-hyperion-tempo-review-2020.html', 'id': '3U7runLSyYNIBlRHETTWCA'}]\n",
      "\u001b[0m"
     ]
    }
   ],
   "source": [
    "response = execute_step(agent, task)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "211cf323-790c-4ee1-a3b3-7abdf573b9b5",
   "metadata": {},
   "outputs": [],
   "source": [
    "# output is hidden because too long\n",
    "response = execute_step(agent, task)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "13bdea5c-30a6-4cb8-be79-39cd4e69e299",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[1;3;38;5;200mThought: I can answer without using any more tools.\n",
      "Response: The Adidas Ultraboost is reviewed as an expensive but versatile shoe suitable for various activities, from running a half marathon to going out on a date. They are considered a good value due to their durability, with the reviewer getting hundreds of miles out of them. The shoes are described as lightweight, breathable, and comfortable enough to wear without socks. However, they are not recommended for wet climates as they do not perform well in the rain. The reviewer also mentions owning seven different models of Adidas Boost, indicating a strong preference for the brand.\n",
      "\u001b[0m> Agent finished: The Adidas Ultraboost is reviewed as an expensive but versatile shoe suitable for various activities, from running a half marathon to going out on a date. They are considered a good value due to their durability, with the reviewer getting hundreds of miles out of them. The shoes are described as lightweight, breathable, and comfortable enough to wear without socks. However, they are not recommended for wet climates as they do not perform well in the rain. The reviewer also mentions owning seven different models of Adidas Boost, indicating a strong preference for the brand.\n"
     ]
    }
   ],
   "source": [
    "response = execute_step(agent, task)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "54e1b6d7-f940-4806-8418-ab86074dda17",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Adidas Ultraboost is reviewed as an expensive but versatile shoe suitable for various activities, from running a half marathon to going out on a date. They are considered a good value due to their durability, with the reviewer getting hundreds of miles out of them. The shoes are described as lightweight, breathable, and comfortable enough to wear without socks. However, they are not recommended for wet climates as they do not perform well in the rain. The reviewer also mentions owning seven different models of Adidas Boost, indicating a strong preference for the brand.\n"
     ]
    }
   ],
   "source": [
    "print(str(response))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "llama_index_v2",
   "language": "python",
   "name": "llama_index_v2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
